package interfacedemo;

public class Demo {
    public static void main(String[] args) {
        //Dog d = new Dog();
        //method01(d);         // 狗刨
        method01(new Dog());

        Swim swim = method02();
        swim.swimming();     // 狗刨
    }

    public static void method01(Swim s){
        s.swimming();
    }

    public static Swim method02(){
        // Dog dog = new Dog();
        // return dog;
        return new Dog();
    }
}




class Person{
    // 姓名 年龄
    // 吃饭

    class Herat{
        // 左心房 右心房
        // 跳动
    }
}

// Herat 就是 Person 的内部类

